1. Technical Field
This invention generally relates to object oriented programming and more specifically relates to an apparatus and method for creating a real-time class package to class archive file mapping index.
2. Background Art
Computer systems typically include operating system software that controls the basic function of the computer, and one or more software application programs that run under the control of the operating system to perform desired tasks. As the capabilities of computer systems have increased, the application software programs designed for high performance computer systems have become extremely powerful. Additionally, software development costs have continued to rise because more powerful and complex programs take more time, and hence more money, to produce.
One way in which the performance of application software programs has been improved while the associated development costs have been reduced is by using object-oriented programming concepts. The goal of using object-oriented programming is to create small, reusable sections of program code known as “objects” that can be quickly and easily combined and re-used to create new programs. This is similar to the idea of using the same set of building blocks again and again to create many different structures. The modular and re-usable aspects of objects will typically speed development of new programs, thereby reducing the costs associated with the development cycle. In addition, by creating and re-using a comprehensive set of well-tested objects, a more stable, uniform, and consistent approach to developing new computer programs can be achieved.
A central concept in object-oriented programming is the “class.” A class is a template that defines a type of object. A class outlines or describes the characteristics or makeup of objects that belong to that class. By defining a class, objects can be created that belong to the class without having to rewrite the entire definition for each new object as it is created. This feature of object-oriented programming promotes the reusability of existing object definitions and promotes more efficient use of program code.
Many object oriented programming languages allow packaging multiple classes together in a class archive file. In Java, the class archive file is known as a JAR, where the name comes from the file extension (file.jar). When an application needs a class, the JARs are searched for the needed class. In large applications, the search can impact performance due to the large number of JARs in the search path. One prior art solution has been to combine JARs into one or a few large JARs to decrease the search path, but this solution is not optimal for code reuse and cannot be used where the class path search order must be maintained to ensure the same class file is found given a specific class name.
Another prior art solution created a data structure that maps Java class packages to JARs, so all the JARs in the class path do not need to be searched for each needed class. The prior art systems that used this approach required pre-processing to create a Java package to JAR mapping index. This solution using preprocessing is not practical in complex and changing environments. Without a mechanism for creating a Java package to JAR mapping that can be done without pre-processing or done in real-time, the computer industry will continue to suffer from performance penalties caused by excessive resources used for class path searches.